package com.CST.mapper.cst.zx;

import com.CST.dto.zx.ZxUserProjectRelationPageDTO;
import com.CST.dto.zx.addUserDTO;
import com.CST.entity.zx.ZxUserProjectRelation;
import com.CST.vo.zx.ZxProjectTypeList;
import com.CST.vo.zx.ZxUserListVO;
import com.CST.vo.zx.ZxUserProjectRelationVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qtx
 * @since 2023-06-07
 */
@Mapper
public interface ZxUserProjectRelationMapper extends BaseMapper<ZxUserProjectRelation> {

    /**
     * 主数据查询
     *
     * @return
     */
    IPage<ZxUserProjectRelationVO> selectPageNew(@Param("page") Page<ZxUserProjectRelationVO> page,
                                                 @Param("dto") ZxUserProjectRelationPageDTO dto);

    /**
     * 查询用户工号的人员
     *
     * @param dto
     * @return
     */
    List<ZxUserListVO> userList(@Param("dto") addUserDTO dto);

    /**
     * 获取项目类别下拉列表
     * @return
     */
    List<ZxProjectTypeList> projectList(String entryCode);

    /**
     * 查找已经添加的用户
     * @return
     */
    List<ZxUserProjectRelation> inList(@Param("userId") String userId);
    List<String>  getRoleId();
}
